package com.microservice.salmon.db.entities;

import lombok.Data;
import lombok.EqualsAndHashCode;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Table(name = "t_goods")
@Data
@EqualsAndHashCode(of = "goodsId")
public class GoodsSpu implements Serializable {
    private static final long serialVersionUID = 4938360979793003738L;
    /**
     * 自增ID
     */
    @Id
    @Column(name = "goods_id")
    @KeySql(useGeneratedKeys = true)
    private Integer goodsId;

    /**
     * 商品编号
     */
    @Column(name = "goods_sn")
    private String goodsSn;

    /**
     * 商品货号
     */
    @Column(name = "product_no")
    private String productNo;

    /**
     * 商品名称
     */
    @Column(name = "goods_name")
    private String goodsName;

    /**
     * 所属门店ID
     */
    @Column(name = "shop_id")
    private Integer shopId;

    /**
     * 商品类型 0: 实物商品 1:虚拟商品
     */
    @Column(name = "goods_type")
    private Byte goodsType;

    /**
     * 是否上架 0:下架 1:上架
     */
    @Column(name = "is_sale")
    private Boolean isSale;

    /**
     * 是否精品 0:否 1:是
     */
    @Column(name = "is_best")
    private Boolean isBest;

    /**
     * 是否热销产品 0:否 1:是
     */
    @Column(name = "is_hot")
    private Boolean isHot;

    /**
     * 是否新品 0:否 1:是
     */
    @Column(name = "is_new")
    private Boolean isNew;

    /**
     * 是否推荐 0:否 1:是
     */
    @Column(name = "is_recom")
    private Boolean isRecom;

    /**
     * 商品分类ID路径
     */
    @Column(name = "goods_cat_id_path")
    private String goodsCatIdPath;

    /**
     * 最后一级商品分类ID
     */
    @Column(name = "goods_cat_id")
    private Integer goodsCatId;

    /**
     * 门店商品分类ID路径
     */
    @Column(name = "shop_cat_id_path")
    private String shopCatIdPath;

    /**
     * 门店最后一级商品分类ID
     */
    @Column(name = "shop_cat_id")
    private Integer shopCatId;

    /**
     * 品牌Id
     */
    @Column(name = "brand_id")
    private Integer brandId;

    /**
     * 商品状态 -1:违规 0:未审核 1:已审核
     */
    @Column(name = "goods_status")
    private Byte goodsStatus;

    /**
     * 上架时间
     */
    @Column(name = "sale_time")
    private Date saleTime;

    /**
     * 状态说明	一般用于说明拒绝原因
     */
    @Column(name = "illegal_remarks")
    private String illegalRemarks;

    /**
     * 是否可以免费送货 0 否 1 是
     */
    @Column(name = "is_free_shipping")
    private Boolean isFreeShipping;

    /**
     * 删除标志 0:删除 1:有效
     */
    @Column(name = "data_flag")
    private Boolean dataFlag;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 促销信息-子标题
     */
    @Column(name = "goods_tips")
    private String goodsTips;

}